package com.bqy.myokgo.base.okgo.callback;

import com.bqy.myokgo.base.okgo.bean.MD5;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.request.base.Request;

/**
 * 熊猫先生
 * 2018/10/22:10:57
 */

public abstract class Callback<T> extends AbsCallback<T> {

    @Override
    public void onStart(Request<T, ? extends Request> request) {
        super.onStart(request);
        String Numr = MD5.getRandomCharAndNumr(32);
        String md5 = MD5.GetMD5Code(MD5.getString(Numr.toCharArray()));
        request.headers("DeviceNo", Numr)//随机数
                .headers("Channel", "1.4.3")//版本号
                .headers("Mac", md5)//md5串
                .headers("AgentId", "21808151256180020")
                .headers("mark", "170925135542000")
                .headers("SalesChannels", "2")
                .headers("CompanyId", "21808151256180020");
    }


}
